﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UIWindows.Models.Homes
{
    public class ProcessCapabilityModel : Domains.ViewModelBase
    {
        public event PropertyChangedEventHandler PropertyChanged;
        /// <summary>
        /// 实际注液量集合
        /// </summary>
        public ObservableCollection<double> InjectionVolumeCollection { get; set; }
        /// <summary>
        /// 保有量集合
        /// </summary>
        public ObservableCollection<double> OwnershipVolumeCollection { get; set; }

        private double _cp;
        /// <summary>
        /// 制程精密度(Cp)
        /// </summary>
        public double CP
        {
            get { return _cp; }
            set { SetProperty(ref _cp, value); }
        }

        private double _ca;
        /// <summary>
        /// 制程准确度(Ca)
        /// </summary>
        public double CA
        {
            get { return _ca; }
            set { SetProperty(ref _ca, value); }
        }

        private double _cpk;
        /// <summary>
        /// 制程能力指数(cpk)
        /// </summary>
        public double CPK
        {
            get { return _cpk; }
            set { SetProperty(ref _cpk, value); }
        }


        /// <summary>
        /// 规格上限
        /// </summary>
        public double USL { get; set; }
        /// <summary>
        /// 规格下限
        /// </summary>
        public double LSL { get; set; }
        /// <summary>
        /// 规格中心值
        /// </summary>
        public double U { get; set; }
        /// <summary>
        /// 标准差
        /// </summary>
        public double SpecificationStandardDeviation { get; set; }
        /// <summary>
        /// 规格公差 = 规格上限 - 规格下限
        /// </summary>
        public double T { get; set; }

        /// <summary>
        /// 样本平均值 = 总和/数量
        /// </summary>
        public double X { get; set; }
        /// <summary>
        /// CPK上限
        /// </summary>
        public double CpkU { get; set; }
        /// <summary>
        /// CPK下限
        /// </summary>
        public double CpkL { get; set; }

    }
}
